package com.sgcc.sx.pmos.common.bean;

import android.text.TextUtils;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.List;
import java.util.Map;

public class ComparisonDetailContentBean implements MultiItemEntity {
    public static final int TITLE = 1;//标题
    public static final int CONTENT = 2;//内容
    private int itemType;

    private String titleName;
    private String rightText;
    private int iconRes;


    public ComparisonDetailContentBean(int itemType, String contentTitleName, List<ContentBean> contentList) {
        this.itemType = itemType;
        this.contentTitleName = contentTitleName;
        this.contentList = contentList;
    }

    public ComparisonDetailContentBean(int itemType, int iconRes, String titleName) {
        this.itemType = itemType;
        this.iconRes = iconRes;
        this.titleName = titleName;
    }

    public ComparisonDetailContentBean(int itemType, int iconRes, String titleName, String rightText) {
        this.itemType = itemType;
        this.iconRes = iconRes;
        this.titleName = titleName;
        this.rightText = rightText;
    }

    public int getIconRes() {
        return iconRes;
    }

    public String getTitleName() {
        return titleName;
    }

    public String getRightText() {
        return TextUtils.isEmpty(rightText) ? "" : rightText;
    }

    private List<ContentBean> contentList;
    private String contentTitleName;

    public List<ContentBean> getContentList() {
        return contentList;
    }

    public String getContentTitleName() {
        return contentTitleName;
    }

    @Override
    public int getItemType() {
        return itemType;
    }

    public static class MealBean {

        private boolean isUnderline;//是否添加下划线 第一行
        private boolean isColor;//是否改变颜色 第一行
        private String text1;//第1行text
        private String text2;//第2行text
        private List<String> priceCurveList;

        public MealBean(boolean isUnderline, boolean isColor, String text1, String text2, List<String> priceCurveList) {
            this.isUnderline = isUnderline;
            this.isColor = isColor;
            this.text1 = text1;
            this.text2 = text2;
            this.priceCurveList = priceCurveList;
        }
        public MealBean(boolean isUnderline, boolean isColor, String text1 , List<String> priceCurveList) {
            this.isUnderline = isUnderline;
            this.isColor = isColor;
            this.text1 = text1;
            this.priceCurveList = priceCurveList;
        }

        public List<String> getPriceCurveList() {
            return priceCurveList;
        }


        public MealBean() {
        }

        public boolean isUnderline() {
            return isUnderline;
        }

        public boolean isColor() {
            return isColor;
        }

        public String getText1() {
            return text1;
        }

        public String getText2() {
            return text2;
        }

    }


    public static class ContentBean {

        private String text;
        private String packageId;
        private int imgRes;
        private int selectIndex;//月份选择的哪一个
        private int flag;//-1 普通text  1 本地图片 2 套餐数据  9 选择套餐月份 下拉选择
        private boolean isOptimal;//是否最优
        private List<PackageInfoMonthBean.Bean> monthDataList;
        private MealBean mealBean;


        public ContentBean(int flag, String text) {
            this.flag = flag;
            this.text = text;
        }

        public ContentBean(int flag, String text, String packageId) {
            this.flag = flag;
            this.text = text;
            this.packageId = packageId;
        }

        public ContentBean(int flag, MealBean mealBean) {
            this.flag = flag;
            this.mealBean = mealBean;
        }

        public ContentBean(int flag, int selectIndex, List<PackageInfoMonthBean.Bean> monthDataList) {
            this.flag = flag;
            this.selectIndex = selectIndex;
            this.monthDataList = monthDataList;
        }


        public ContentBean(int flag, String text, boolean isOptimal) {
            this.flag = flag;
            this.text = text;
            this.isOptimal = isOptimal;
        }

        public ContentBean(int flag, int imgRes) {
            this.flag = flag;
            this.imgRes = imgRes;
        }

        public ContentBean(int flag, int imgRes, boolean isOptimal) {
            this.flag = flag;
            this.imgRes = imgRes;
            this.isOptimal = isOptimal;
        }

        public String getText() {
            return TextUtils.isEmpty(text) ? "--" : text;
        }

        public MealBean getMealBean() {
            return mealBean;
        }

        public int getFlag() {
            return flag;
        }

        public int getImgRes() {
            return imgRes;
        }

        public boolean isOptimal() {
            return isOptimal;
        }

        public List<PackageInfoMonthBean.Bean> getMonthDataList() {
            return monthDataList;
        }

        public int getSelectIndex() {
            return selectIndex;
        }

        public String getPackageId() {
            return packageId;
        }

        public void setText(String text) {
            this.text = text;
        }

        public void setPackageId(String packageId) {
            this.packageId = packageId;
        }

        public void setImgRes(int imgRes) {
            this.imgRes = imgRes;
        }

        public void setSelectIndex(int selectIndex) {
            this.selectIndex = selectIndex;
        }

        public void setFlag(int flag) {
            this.flag = flag;
        }

        public void setOptimal(boolean optimal) {
            isOptimal = optimal;
        }

        public void setMonthDataList(List<PackageInfoMonthBean.Bean> monthDataList) {
            this.monthDataList = monthDataList;
        }

        public void setMealBean(MealBean mealBean) {
            this.mealBean = mealBean;
        }


    }
}